// 快速问诊页面样式
.consultationPage {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
  padding-bottom: 200px; // 为底部固定输入区域留出空间
}

// 步骤条样式 - 箭头形状
.stepBar {
  display: flex;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  
  .stepItem {
    flex: 1;
    position: relative;
    height: 40px;
    
    &:first-child {
      .stepContent {
        margin-right: -1px;
        
        &::after {
          content: '';
          position: absolute;
          right: -10px;
          top: 0;
          width: 0;
          height: 0;
          border-left: 10px solid #4CAF50;
          border-top: 20px solid transparent;
          border-bottom: 20px solid transparent;
          z-index: 3;
        }
      }
    }
    
    &:last-child {
      .stepContent {
        margin-left: -1px;
        
        &::before {
          content: '';
          position: absolute;
          left: -10px;
          top: 0;
          width: 0;
          height: 0;
          border-right: 10px solid #E0E0E0;
          border-top: 20px solid transparent;
          border-bottom: 20px solid transparent;
          z-index: 1;
        }
      }
    }
    
    &:not(:first-child):not(:last-child) {
      .stepContent {
        margin-left: -1px;
        margin-right: -1px;
        
        &::before {
          content: '';
          position: absolute;
          left: -10px;
          top: 0;
          width: 0;
          height: 0;
          border-right: 10px solid #E0E0E0;
          border-top: 20px solid transparent;
          border-bottom: 20px solid transparent;
          z-index: 1;
        }
        
        &::after {
          content: '';
          position: absolute;
          right: -10px;
          top: 0;
          width: 0;
          height: 0;
          border-left: 10px solid #E0E0E0;
          border-top: 20px solid transparent;
          border-bottom: 20px solid transparent;
          z-index: 3;
        }
      }
    }
    
    &.current {
      .stepContent {
        background: #4CAF50;
        color: #fff;
        z-index: 2;
        
        &::after {
          border-left-color: #4CAF50;
        }
      }
    }
    
    &.completed {
      .stepContent {
        background: #4CAF50;
        color: #fff;
        z-index: 2;
        
        &::after {
          border-left-color: #4CAF50;
        }
      }
    }
    
    .stepContent {
      position: relative;
      height: 100%;
      background: #E0E0E0;
      color: #666;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 16px;
      transition: all 0.3s ease;
      z-index: 1;
    }
    
    .stepTitle {
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
    }
  }
}

// 步骤内容容器
.stepContainer {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.stepContent {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

// 聊天区域样式
.chatArea {
  margin-bottom: 20px;
  
  .assistantMessage {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    
    .avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      margin-right: 12px;
      flex-shrink: 0;
      
      .avatarPlaceholder {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: #e6f7ff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
      }
    }
    
    .messageBubble {
      background: #f5f5f5;
      padding: 12px;
      border-radius: 12px;
      max-width: 80%;
      
      .assistantName {
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
      }
      
      .messageText {
        font-size: 14px;
        color: #333;
        line-height: 1.5;
      }
    }
  }
  
  .userMessage {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    
    .userBubble {
      background: #1890ff;
      color: #fff;
      padding: 12px;
      border-radius: 12px;
      max-width: 80%;
    }
  }
}

// 历史病情提示
.historyPrompt {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  
  .historyItem {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    
    &:hover {
      background: #e6f7ff;
    }
  }
}

// 输入区域
.inputArea {
  margin-top: 16px;
  
  .textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
    
    &:focus {
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    }
    
    &::placeholder {
      color: #bfbfbf;
    }
  }
  
  .charCount {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
  }
}

// 跳过区域
.skipArea {
  margin-top: 16px;
  text-align: center;
}

// 患者档案区域
.patientArchives {
  .privacyNotice {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #d46b08;
    
    span:first-child {
      margin-right: 8px;
      font-size: 16px;
    }
  }
  
  .createArchive {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    border: 2px dashed #52c41a;
    border-radius: 8px;
    background: #f6ffed;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    
    &:hover {
      background: #d9f7be;
    }
    
    span {
      margin: 0 4px;
      color: #52c41a;
      font-size: 14px;
    }
  }
  
  .patientCard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    
    &:hover {
      border-color: #1890ff;
      background: #f0f8ff;
    }
    
    &.selected {
      border-color: #52c41a;
      background: #f6ffed;
    }
    
    .patientInfo {
      .name {
        font-size: 16px;
        font-weight: bold;
        color: #333;
        margin-bottom: 4px;
      }
      
      .details {
        font-size: 14px;
        color: #666;
      }
    }
  }
}

// 患者表单
.patientForm {
  padding: 20px;
  background: #fff;
  
  .formHeader {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
  }
  
  .formActions {
    margin-top: 20px;
    text-align: center;
  }
}

// 医生匹配页面
.userInfo {
  text-align: right;
  margin-bottom: 16px;
  font-size: 14px;
  color: #666;
}

.serviceDisclaimer {
  background: #f0f0f0;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
}

.departmentMatch {
  background: #f6ffed;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
  
  .matchText {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
  }
  
  .departmentName {
    font-size: 18px;
    font-weight: bold;
    color: #52c41a;
    margin-bottom: 12px;
  }
}

// 套餐选择
.packageSelection {
  margin-bottom: 16px;
  
  .packageItem {
    position: relative;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    
    &:hover {
      border-color: #1890ff;
    }
    
    &.selected {
      border-color: #52c41a;
      background: #f6ffed;
    }
    
    .recommendedTag {
      position: absolute;
      top: -8px;
      left: 16px;
      background: #ff6b35;
      color: #fff;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 12px;
    }
    
    .packageInfo {
      .packageName {
        font-size: 16px;
        font-weight: bold;
        color: #333;
        margin-bottom: 4px;
      }
      
      .packageDesc {
        font-size: 14px;
        color: #666;
        margin-bottom: 8px;
      }
      
      .packagePrice {
        .currentPrice {
          font-size: 18px;
          font-weight: bold;
          color: #ff4d4f;
          margin-right: 8px;
        }
        
        .originalPrice {
          font-size: 14px;
          color: #999;
          text-decoration: line-through;
        }
      }
    }
  }
}

.multiDoctorTip {
  background: #f6ffed;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #52c41a;
  margin-bottom: 16px;
  text-align: center;
}

// 医生列表
.doctorsList {
  .doctorCard {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    
    &:hover {
      border-color: #1890ff;
    }
    
    &.selected {
      border-color: #52c41a;
      background: #f6ffed;
    }
    
    .doctorAvatar {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background: #e6f7ff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      margin-right: 16px;
      flex-shrink: 0;
    }
    
    .doctorInfo {
      flex: 1;
      
      .doctorName {
        font-size: 16px;
        font-weight: bold;
        color: #333;
        margin-bottom: 4px;
      }
      
      .doctorTags {
        margin-bottom: 4px;
        
        .tag {
          display: inline-block;
          background: #e6f7ff;
          color: #1890ff;
          padding: 2px 6px;
          border-radius: 3px;
          font-size: 12px;
          margin-right: 8px;
        }
      }
      
      .hospitalInfo {
        font-size: 14px;
        color: #666;
        
        .hospitalTags {
          margin-left: 8px;
          
          .tag {
            background: #f0f0f0;
            color: #666;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 12px;
            margin-right: 4px;
          }
        }
      }
    }
  }
}

// 底部操作区域
.bottomActions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 16px;
  z-index: 1000;
  
  .inputContainer {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
    
    .textarea {
      flex: 1;
      min-height: 60px;
      padding: 8px;
      border: 1px solid #d9d9d9;
      border-radius: 6px;
      font-size: 12px;
      line-height: 1.5;
      resize: vertical;
      outline: none;
      transition: border-color 0.3s ease;
      background: #fafafa;
      margin-top: 10px;
      
      &:focus {
        border-color: #1890ff;
        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        background: #fff;
      }
      
      &::placeholder {
        color: #bfbfbf;
      }
    }
    
    .submitButton {
      height: 30px;
      padding: 0 24px;
      white-space: nowrap;
      border-radius: 15px;
      background: #52c41a;
      border-color: #52c41a;
      
      &:hover {
        background: #73d13d;
        border-color: #73d13d;
      }
      
      &:disabled {
        background: #d9d9d9;
        border-color: #d9d9d9;
      }
    }
  }
  
  .uploadSection {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    
    .uploadButton {
      flex: 1;
      height: 50px;
    }
    
    .skipButton {
      flex: 1;
      height: 50px;
    }
  }
  
  .stepActions {
    display: flex;
    justify-content: center;
    
    .nextButton, .submitButton {
      width: 100%;
      height: 50px;
    }
  }
  
  .uploadBottomSection {
    background: #fff;
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    height: 200px;
    overflow-y: auto;
    
    .uploadTitle {
      font-size: 16px;
      font-weight: bold;
      color: #333;
      margin-bottom: 4px;
    }
    
    .uploadDesc {
      font-size: 12px;
      color: #666;
      margin-bottom: 8px;
    }
    
    .uploadArea {
      margin-bottom: 8px;
      min-height: 40px;
      
      .uploadBox {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 80px;
        height: 60px;
        border: 2px dashed #d9d9d9;
        border-radius: 6px;
        background: #fafafa;
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 0 auto 8px;
        
        &:hover {
          border-color: #1890ff;
          background: #f0f8ff;
        }
        
        .uploadIcon {
          font-size: 24px;
          color: #d9d9d9;
          margin-bottom: 2px;
        }
        
        .uploadText {
          font-size: 12px;
          color: #d9d9d9;
        }
      }
      
      .uploadedGrid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        
        .imageItem {
          position: relative;
          width: 50px;
          height: 50px;
          border-radius: 4px;
          overflow: hidden;
          
          img {
            width: 50px;
            height: 50px;
            object-fit: cover;
          }
          
          .deleteBtn {
            position: absolute;
            top: 1px;
            right: 1px;
            width: 12px;
            height: 12px;
            background: rgba(0, 0, 0, 0.6);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            cursor: pointer;
            
            &:hover {
              background: rgba(0, 0, 0, 0.8);
            }
          }
        }
      }
    }
    
    .guideLink {
      text-align: center;
      color: #1890ff;
      font-size: 10px;
      margin-bottom: 8px;
      cursor: pointer;
      
      &:hover {
        color: #40a9ff;
      }
    }
    
    .uploadActions {
      display: flex;
      gap: 8px;
      
      .skipButton {
        flex: 1;
        height: 32px;
        font-size: 12px;
      }
      
      .confirmButton {
        flex: 2;
        height: 32px;
        font-size: 12px;
        background: #52c41a;
        border-color: #52c41a;
        
        &:hover {
          background: #73d13d;
          border-color: #73d13d;
        }
      }
    }
  }
  
  .uploadActions {
    display: flex;
    justify-content: center;
    
    .confirmButton {
      width: 100%;
      height: 50px;
      background: #52c41a;
      border-color: #52c41a;
      
      &:hover {
        background: #73d13d;
        border-color: #73d13d;
      }
    }
  }
  
  .charCount {
    text-align: right;
    font-size: 12px;
    color: #999;
  }
}


// 上传页面样式
.uploadPage {
  padding: 20px;
  background: #fff;
  min-height: calc(100vh - 120px);
  
  .uploadHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    
    .uploadTitle {
      font-size: 24px;
      font-weight: bold;
      color: #333;
      margin: 0;
    }
    
    .skipLink {
      color: #1890ff;
      font-size: 16px;
      cursor: pointer;
      
      &:hover {
        color: #40a9ff;
      }
    }
  }
  
  .uploadDesc {
    font-size: 16px;
    color: #333;
    margin-bottom: 24px;
  }
  
  .uploadArea {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    
    .uploadBox {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 80px;
      height: 80px;
      border: 2px dashed #d9d9d9;
      border-radius: 8px;
      background: #fafafa;
      cursor: pointer;
      transition: all 0.3s ease;
      flex-shrink: 0;
      
      &:hover {
        border-color: #1890ff;
        background: #f0f8ff;
      }
      
      .uploadIcon {
        font-size: 24px;
        color: #d9d9d9;
        margin-bottom: 4px;
      }
      
      .uploadText {
        font-size: 12px;
        color: #d9d9d9;
        text-align: center;
      }
    }
    
    .uploadedGrid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 12px;
      margin-top: 8px;
      
      .imageItem {
        position: relative;
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
        
        img {
          width: 80px;
          height: 80px;
          object-fit: cover;
        }
        
        .deleteBtn {
          position: absolute;
          top: 2px;
          right: 2px;
          width: 16px;
          height: 16px;
          background: rgba(0, 0, 0, 0.6);
          color: white;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 10px;
          cursor: pointer;
          
          &:hover {
            background: rgba(0, 0, 0, 0.8);
          }
        }
      }
    }
  }
  
  .guideLink {
    text-align: center;
    color: #1890ff;
    font-size: 14px;
    margin-top: 24px;
    cursor: pointer;
    
    &:hover {
      color: #40a9ff;
    }
  }
}

// 响应式设计
@media (max-width: 375px) {
  .stepBar {
    padding: 8px 12px;

    .stepItem {
      .stepTitle {
        font-size: 11px;
      }
    }
  }
  .stepContainer {
    padding: 12px;
  }
  
  .stepContent {
    padding: 12px;
  }
}
